import React, {Component} from 'react';
import {RouteComponentProps} from 'react-router-dom'
import store from "../redux/store";

interface IParams {
    id:string
}

export default class App extends Component<RouteComponentProps<IParams>> {
    componentDidMount() {
        // console.log((this.props.match.params as any).id)  // 断言
        console.log(this.props.match.params.id)

        store.dispatch({
            type:'hide'
        })
    }

    componentWillUnmount() {
        store.dispatch({
            type:'show'
        })
    }

    render() {
        return (
            <div>
                detail
            </div>
        );
    }
}